<?php
/**
 * tvb log stdout appender
==================================
<appender>stdout</appender>
 <stdout>
	<out_class>Stdout</out_class>
	<pattern>SimpleText</pattern>
</stdout>
==================================
 * @author William Hu <william.hu@achievo.com>
 * @version 1.0
 * @package TVBLog
 */
require_once 'TVB/Logger/Appender/Interface.php';
class TVB_Logger_Appender_Stdout implements TVB_Logger_Appender_Interface
{
    public function write($log_entity)
    {
		$data_info = TVB_Logger_Config::get('stdout', $log_entity->category);
		require_once 'TVB/Logger/Pattern.php';
		$pattern = TVB_Logger_Pattern::get($data_info['pattern']);
		//$pattern = TVB_Logger_Pattern::get('Xml');
		$format_text = $pattern->toString($log_entity);
		echo $format_text."\n";
		return TRUE;
    }
}
